<div class="container member-container">
    <?php include $this->getViewFile('../lib/leftmenu'); ?>
    <div class="col-md-10 member-con menber-score-con">
        <div class="title mb-common-title">积分商品报名列表<a style="padding-left:30px;color:red" href="<?php echo YzwController::U('add') ?>">添加</a></div>
        <div class="content menber-score-good">

            <table>
                <tr>
                    <td class="bm_query_biaoqian <?php if ($label == 0) echo "tab_b tab_c"; ?>" ><a class="tab_a" href="<?php echo YzwController::U('index', array('label' => 0)) ?>">待审核产品<br><?php echo $count[0]; ?></a></td>
                    <td class="bm_query_biaoqian <?php if ($label == 1) echo "tab_b tab_c"; ?>" ><a class="tab_a" href="<?php echo YzwController::U('index', array('label' => 1)) ?>">通过审核<br><?php echo $count[1]; ?></a></td>
                    <td class="bm_query_biaoqian <?php if ($label == 2) echo "tab_b tab_c"; ?>" ><a class="tab_a" href="<?php echo YzwController::U('index', array('label' => 2)) ?>">审核被拒绝<br><font><?php echo $count[2]; ?></font></a></td>                    
                    <td class="bm_query_biaoqian <?php if ($label == 3) echo "tab_b tab_c"; ?>" ><a class="tab_a" href="<?php echo YzwController::U('index', array('label' => 3)) ?>">已取消<br><?php echo $count[3]; ?></a></td>
                    <td class="bm_query_biaoqian <?php if ($label == 4) echo "tab_b tab_c"; ?>" ><a class="tab_a" href="<?php echo YzwController::U('index', array('label' => 4)) ?>">未付款<br><?php echo $count[4]; ?></a></td>
                    <td class="bm_query_biaoqian <?php if ($label == 5) echo "tab_b tab_c"; ?>" ><a class="tab_a" href="<?php echo YzwController::U('index', array('label' => 5)) ?>">已付款<br><?php echo $count[5]; ?></a></td>
                    <td class="bm_query_biaoqian <?php if ($label == 6) echo "tab_b tab_c"; ?>" ><a class="tab_a" href="<?php echo YzwController::U('index', array('label' => 6)) ?>">已退款<br><?php echo $count[6]; ?></a></td>

                </tr>
            </table>


            <table>
                <thead>
                    <tr>
                        <td width="100">商品</td>
                        <td width="80">价格</td>
                        <td width="190">所需积分</td>
                        <td width="100">兑换数量</td>
                        <td width="100">付款状态</td>
                        <td width="100">状态</td>
                        <td width="100">操作</td>                     
                    </tr>
                </thead>
                <tbody>

                    <?php if ($models): ?>
                    <?php foreach ($models as $model): ?>
                        <tr>
                            <td><a href="<?php echo yii::app()->createUrl('/front/good/redeemskip', array('gid' => $model->id)) ?>" target="_blank"><img src="<?php echo $model->thumb ?>" width="80" height="80" /></a></td>
                            <td><?php echo $model->worth ?></td>
                            <td><?php echo $model->integral; ?></td>       
                            <td><?php echo $model->quantum; ?></td>
                            <td><?php echo RedeemModel::getPayStatusHtmlDetail($model->pay_status); ?></td>
                            <td><?php echo RedeemModel::getStatusHtmlDetail($model->status); ?></td>
                            <td>
                                <?php
                                $arrDatas = $model->getOperationHtml();
                                foreach($arrDatas as $key => $arrData)
                                {
                                    echo "<div><a href='{$arrData['url']}'>{$arrData['html']}</a></div>";
                                } 
                                ?>
                            </td>
                        </tr>
                    <?php endforeach ?>   
                    <?php endif ?>  

                    <?php if ($pages && $pages->pageCount > 1): ?>
                        <tr>
                            <td colspan="7" class="pager">
                                <?php
                                $this->widget('CLinkPager', array(
                                    'header' => "",
                                    'firstPageLabel' => '首页',
                                    'lastPageLabel' => '末页',
                                    'prevPageLabel' => '上一页',
                                    'nextPageLabel' => '下一页',
                                    'pages' => $pages,
                                    'footer' => "<span>共<em>{$pages->pageCount}</em>页</span>",
                                    'maxButtonCount' => 5
                                        )
                                );
                                ?>
                            </td>
                        </tr>
                    <?php  endif ?>
                </tbody>

            </table>
        </div>
    </div>
    <div class="clearfix"></div>
</div>